//
//  ZGSSiteViewController.m
//  Tour
//
//  Created by dllo on 15/10/30.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "ZGSSiteViewController.h"
#import "AdvanceEdit.h"
#import "ZGSViewController.h"
@interface ZGSSiteViewController ()

@end

@implementation ZGSSiteViewController
- (void)dealloc{
    [_photo release];
    [_name release];
    [_cityId release];
    [_type release];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"地点";
    self.view.backgroundColor = [UIColor whiteColor];
    UIImageView *headImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT / 2.5)];
    [headImage sd_setImageWithURL:[NSURL URLWithString:self.photo] placeholderImage:[UIImage imageNamed:@"10.jpeg"]];
    [self.view addSubview:headImage];
    
    [headImage release];
    
    UILabel *labelName = [[UILabel alloc] initWithFrame:CGRectMake(0, HEIGHT / 2.5 + 10, WIDTH, 50)];
    labelName.textAlignment = 1;
    labelName.text = self.name;
    [self.view addSubview:labelName];
    [labelName release];
    
    UIButton *buttonChose = [UIButton buttonWithType:UIButtonTypeSystem];
    buttonChose.frame = CGRectMake(20, HEIGHT / 2.5 + 100, WIDTH - 40, 50);
    [buttonChose setTitle:@"为你精选" forState:UIControlStateNormal];
    [buttonChose addTarget:self action:@selector(choseAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:buttonChose];
    
    UIButton *buttonPossess = [UIButton buttonWithType:UIButtonTypeSystem];
    buttonPossess.frame = CGRectMake(20, HEIGHT / 2.5 + 170, WIDTH - 40, 50);
    [buttonPossess setTitle:@"祝你旅游愉快(*^__^*)" forState:UIControlStateNormal];
//    [buttonPossess addTarget:self action:@selector(possessAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:buttonPossess];

    
}

- (void)choseAction:(UIButton *)button{
    ZGSViewController *zgsVC = [[ZGSViewController alloc] init];
    zgsVC.type = self.type;
    zgsVC.cithId = self.cityId;
    [self.navigationController pushViewController:zgsVC animated:YES];
    
}

- (void)possessAction:(UIButton *)button{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
